package com.gagakuai.engine.impl.interceptor.defaultImpl;

import com.gagakuai.engine.impl.cfg.ProcessEngineConfigurationImpl;
import com.gagakuai.engine.impl.interceptor.Command;
import com.gagakuai.engine.impl.interceptor.CommandContext;

/*
 * @program: common-starters
 * @description: 命令上下文工厂
 * @author: houhong
 * @create: 2023-01-01 23:24
 */
public class CommandContextFactory {

    protected ProcessEngineConfigurationImpl processEngineConfiguration;


    public CommandContext createCommandContext(Command<?> command) {
        return new CommandContext(command, processEngineConfiguration);
    }

    public ProcessEngineConfigurationImpl getProcessEngineConfiguration() {
        return processEngineConfiguration;
    }

    public void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration) {
        this.processEngineConfiguration = processEngineConfiguration;
    }
}